<% if envs.present? %>
<table class="<%= table_css_classes 'table-fixed' %>">
  <thead>
    <th class="col-md-10"><%= _("Environment") %></th>
    <th class="col-md-2"><%= _("Number of classes") %></th>
  </thead>
  <tbody>
    <% envs.each do |name, count| %>
      <tr>
        <td class="ellipsis"><%= name %></td>
        <td><%= link_to count, puppetclasses_path(:search => "environment = #{name}") %></td>
      </tr>
    <% end %>
    <tfoot>
      <th><%= _("Total") %></th>
      <th><%= envs.values.reduce(&:+) %></th>
    </tfoot>
  </tbody>
</table>
<% else %>
<div class="blank-slate-pf">
  <div class="blank-slate-pf-icon">
    <%= icon_text("th", "", :kind => "fa") %>
  </div>
  <h3><%= _("No environments found") %></h3>
  <p>
    <%= _("There are no puppet environments set up on this puppet master. Please check the puppet master configuration.") %>
  </p>
</div>
<% end %>
